<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('项目详情')"/>
    <th:block th:include="include :: select2-css"/>
</head>

<body>
<div class="main-content">
    <form class="form-horizontal" id="form-user-edit" th:object="${basRoadway}">
        <input name="id" type="hidden" th:field="*{id}"/>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">巷道号：</label>
                    <div class="col-sm-8">
                        <input name="roadway_id" th:field="*{roadway_id}" placeholder="请输入巷道号" class="form-control"
                               type="text" maxlength="30"
                               readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">仓库id：</label>
                    <div class="col-sm-8">
                        <input name="warehouse_id" th:field="*{warehouse_id}" placeholder="请输入仓库id" class="form-control"
                               type="text" maxlength="30"
                               readonly="readonly">
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">巷道名称：</label>
                    <div class="col-sm-8">
                        <input name="roadway_name" th:field="*{roadway_name}" placeholder="请输入巷道名称" class="form-control"
                               type="text" maxlength="30"
                               readonly="readonly">
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">设备id：</label>
                    <div class="col-sm-8">
                        <input id="device_id" name="device_id" th:field="*{device_id}" placeholder="请输入设备id"
                               class="form-control"
                               type="text" maxlength="30" readonly="readonly">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">入库端入库锁：</label>
                    <div class="col-sm-8">
                        <select name="in_locked" class="form-control m-b" th:field="*{in_locked}" >
                            <option value="Y">锁定</option>
                            <option value="N">解锁</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">出库端出库锁：</label>
                    <div class="col-sm-8">
                        <select name="out_locked" class="form-control m-b" th:field="*{out_locked}" >
                            <option value="Y">锁定</option>
                            <option value="N">解锁</option>
                        </select>
                    </div>
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">出库端回流入库锁：</label>
                    <div class="col-sm-8">
                        <select name="in_locked2" class="form-control m-b" th:field="*{in_locked2}" >
                            <option value="Y">锁定</option>
                            <option value="N">解锁</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <!--<div class="row">-->
        <!--<div class="col-sm-6">-->
        <!--<div class="form-group">-->
        <!--<label class="col-sm-4 control-label">出库端入库锁：</label>-->
        <!--<div class="col-sm-8">-->
        <!--<input id="in_locked1" name="in_locked1" th:field="*{in_locked1}" placeholder="请输入出库锁" class="form-control"-->
        <!--type="text" maxlength="30">-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="col-sm-6">-->
        <!--<div class="form-group">-->
        <!--<label class="col-sm-4 control-label">出库端二楼入库锁：</label>-->
        <!--<div class="col-sm-8">-->
        <!--<input id="in_locked2" name="in_locked2" th:field="*{in_locked2}" placeholder="请输入出库端二楼入库锁" class="form-control"-->
        <!--type="text" maxlength="30">-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->
    </form>
</div>
<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
        </button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
        </button>
    </div>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script type="text/javascript">
    var prefix = ctx + "device/basRoadway";

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-user-edit").serializeArray();
            $.operate.save(prefix + "/edit", data);
        }

    }
</script>
</body>
</html>